home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / reuse.lha / reuse / c / ErrorsDrv.c < prev    next >
Text File  |  1992-08-18  |  2KB  |  56 lines

  1. /* $Id: ErrorsDrv.c,v 1.0 1992/08/07 14:31:41 grosch rel $ */
  2.  
  3. /* $Log: ErrorsDrv.c,v $
  4.  * Revision 1.0  1992/08/07  14:31:41  grosch
  5.  * Initial revision
  6.  *
  7.  */
  8.  
  9. /* Ich, Doktor Josef Grosch, Informatiker, Aug. 1992 */
  10.  
  11. static char rcsid [] = "$Id: ErrorsDrv.c,v 1.0 1992/08/07 14:31:41 grosch rel $";
  12.  
  13. # include "ratc.h"
  14. # include <stdio.h>
  15. # include "Positions.h"
  16. # include "Errors.h"
  17. # include "Sets.h"
  18. # include "Idents.h"
  19.  
  20. int    Integer        = 1;
  21. short    Short        = 2;
  22. long    Long        = 3;
  23. float    Real        = 4.0;
  24. bool    Boolean        = false;
  25. char    Character    = 'a';
  26. char    String []     = "abc";
  27. tSet    Set        ;
  28. tIdent    Ident        ;
  29.  
  30. errors ()
  31. {
  32.    MessageI ("Integer    ", xxError, NoPosition, xxInteger    , (char *) & Integer    );
  33.    MessageI ("Short    ", xxError, NoPosition, xxShort        , (char *) & Short    );
  34.    MessageI ("Long    ", xxError, NoPosition, xxLong        , (char *) & Long    );
  35.    MessageI ("Real    ", xxError, NoPosition, xxReal        , (char *) & Real    );
  36.    MessageI ("Boolean    ", xxError, NoPosition, xxBoolean    , (char *) & Boolean    );
  37.    MessageI ("Character    ", xxError, NoPosition, xxCharacter    , (char *) & Character    );
  38.    MessageI ("String    ", xxError, NoPosition, xxString    ,         String    );
  39.    MessageI ("Set    ", xxError, NoPosition, xxSet        , (char *) & Set    );
  40.    MessageI ("Ident    ", xxError, NoPosition, xxIdent        , (char *) & Ident    );
  41. }
  42.  
  43. main ()
  44. {
  45.    MakeSet (& Set, 10); Include (& Set, 5); Include (& Set, 6);
  46.    Ident = MakeIdent ("def", 3);
  47.    errors ();           (void) fprintf (stderr, "\n");
  48.    StoreMessages (true);
  49.    errors ();
  50.    WriteMessages (stderr); (void) fprintf (stderr, "\n");
  51.    WriteMessages (stdout); (void) fprintf (stdout, "\n");
  52.    StoreMessages (true);
  53.    WriteMessages (stdout);
  54.    return 0;
  55. }
  56.